-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(runtime): MODERN_TARGET is not injected when using Rspack #3502
Conversation
🦋 Changeset detectedLatest commit: e5e45bf The changes in this PR will be included in the next version bump. This PR includes changesets to release 212 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #3502 +/- ##
==========================================
+ Coverage 57.59% 57.86% +0.26%
==========================================
Files 672 653 -19
Lines 17794 17179 -615
Branches 3876 3748 -128
==========================================
- Hits 10249 9940 -309
+ Misses 6934 6640 -294
+ Partials 611 599 -12
... and 132 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Summary
This PR relies on #3501
🤖 Generated by Copilot at e8c52e6
This pull request fixes the global variable issue for modern mode in server-side rendering by adding a
globalVars
option to therspack
command and removing theDefinePlugin
code from the@modern-js/runtime
package. It also updates the changeset file for the patch release of the package.Details
🤖 Generated by Copilot at e8c52e6
globalVars
option torspack
command to injectprocess.env.MODERN_TARGET
variable based on target environment (link)process.env.MODERN_TARGET
usingDefinePlugin
inplugin-runtime/src/ssr/cli/index.ts
(link)@modern-js/runtime
package with fix description in English and Chinese (link)Related Issue
Checklist
pnpm run change
.